package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName plugin_custompay_order
 */
@TableName(value ="plugin_custompay_order")
@Data
public class PluginCustompayOrder implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "trade_no")
    private String tradeNo;

    /**
     * 
     */
    @TableField(value = "transaction_id")
    private String transactionId;

    /**
     * 
     */
    @TableField(value = "goods_name")
    private String goodsName;

    /**
     * 
     */
    @TableField(value = "paytype")
    private Integer paytype;

    /**
     * 
     */
    @TableField(value = "channel_id")
    private Integer channelId;

    /**
     * 
     */
    @TableField(value = "channel_account_id")
    private Integer channelAccountId;

    /**
     * 1已支付  2取消  3退款
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 
     */
    @TableField(value = "create_at")
    private Integer createAt;

    /**
     * 
     */
    @TableField(value = "success_at")
    private Integer successAt;

    /**
     * 
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 
     */
    @TableField(value = "money")
    private BigDecimal money;

    /**
     * 
     */
    @TableField(value = "recharge_type")
    private String rechargeType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PluginCustompayOrder other = (PluginCustompayOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo()))
            && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getPaytype() == null ? other.getPaytype() == null : this.getPaytype().equals(other.getPaytype()))
            && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId()))
            && (this.getChannelAccountId() == null ? other.getChannelAccountId() == null : this.getChannelAccountId().equals(other.getChannelAccountId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()))
            && (this.getSuccessAt() == null ? other.getSuccessAt() == null : this.getSuccessAt().equals(other.getSuccessAt()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getRechargeType() == null ? other.getRechargeType() == null : this.getRechargeType().equals(other.getRechargeType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode());
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getPaytype() == null) ? 0 : getPaytype().hashCode());
        result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
        result = prime * result + ((getChannelAccountId() == null) ? 0 : getChannelAccountId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        result = prime * result + ((getSuccessAt() == null) ? 0 : getSuccessAt().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getRechargeType() == null) ? 0 : getRechargeType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", tradeNo=").append(tradeNo);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", paytype=").append(paytype);
        sb.append(", channelId=").append(channelId);
        sb.append(", channelAccountId=").append(channelAccountId);
        sb.append(", status=").append(status);
        sb.append(", createAt=").append(createAt);
        sb.append(", successAt=").append(successAt);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", money=").append(money);
        sb.append(", rechargeType=").append(rechargeType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}